fstats_glm_types Module

GLM family identifiers, solver controls, diagnostics, and vector callbacks.



Variables

Type Visibility Attributes Name Initial
integer(kind=int32), public, parameter :: FS_GLM_BINOMIAL = 1

Bernoulli/proportion responses with the logit link; no trial counts.

integer(kind=int32), public, parameter :: FS_GLM_GAMMA = 3

Positive responses with the reciprocal link and V(mu) = mu**2.

integer(kind=int32), public, parameter :: FS_GLM_POISSON = 2

Nonnegative responses with the log link and V(mu) = mu.


Interfaces

public interface assignment(=)

Copy every component of a glm_options object.

  • private subroutine go_assign(lhs, rhs)

    Assigns the contents of one glm_options object to another.

    Arguments

    Type IntentOptional Attributes Name
    type(glm_options), intent(inout) :: lhs

    The glm_options object to receive the contents of rhs.

    type(glm_options), intent(in) :: rhs

    The glm_options object to copy.


Abstract Interfaces

abstract interface

  • public function inverse_link_function(eta) result(mu)

    Evaluate g**(-1)(eta) elementwise.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:) :: eta

    N finite linear predictors in the inverse-link domain.

    Return Value real(kind=real64), allocatable, dimension(:)

    N fitted means in the response family's mean domain.

abstract interface

  • public function robust_weight_function(r, c) result(w)

    Evaluate multiplicative robust weights on raw residuals.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:) :: r

    N raw response residuals y - mu, not standardized.

    real(kind=real64), intent(in) :: c

    Finite positive tuning cutoff in response units.

    Return Value real(kind=real64), allocatable, dimension(:)

    Allocated N-element vector of finite nonnegative weights. Zeros omit observations; remaining rows must identify beta.


Derived Types

type, public ::  glm_coefficient_statistics

Inferential statistics for one GLM coefficient, on the coefficient (linear-predictor) scale rather than the response scale. Use one object per fitted coefficient, in the same order as beta.

Read more…

Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: confidence_interval_lower

Lower confidence bound for the coefficient, not an interval half-width. The producing calculation specifies the confidence level and interval method (for example, Wald or profile likelihood).

real(kind=real64), public :: confidence_interval_upper

Upper confidence bound at the same level and using the same method as confidence_interval_lower. Separate bounds allow asymmetric intervals; no inverse-link transformation is implied.

real(kind=real64), public :: p_value

Two-sided tail probability under the null hypothesis and the chosen reference distribution, in [0,1]. This is not the probability that the coefficient is unimportant or zero.

real(kind=real64), public :: standard_error

Square root of the coefficient covariance diagonal entry.

real(kind=real64), public :: wald_statistic

Signed coefficient divided by its standard error, testing the null hypothesis that the coefficient is zero. Ordinarily an asymptotic z statistic; approximate t inference may be used when dispersion is estimated. The reference distribution must be specified by the calculation producing this object.

type, public ::  glm_convergence_info

Provides information regarding convergence status.

Components

Type Visibility Attributes Name Initial
logical, public :: converged = .false.

True if the iteration process converged to the requested tolerances; else, false.

integer(kind=int32), public :: iteration_count = 0

Completed updates, excluding domain-preserving step halvings.

real(kind=real64), public :: residual_value = 0.0d0

Maximum absolute coefficient change in the last update, not a response residual. IRLS initializes this to NaN before updates.

type, public ::  glm_options

GLM controls. Component initialization and set_to_default agree.

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public :: max_iteration_count = 100

Positive maximum number of completed coefficient updates.

real(kind=real64), public :: robust_weighting_constant = 4.685d0

Finite positive cutoff when robust weighting is enabled. Residuals are raw y - mu, so this has response units. No scale estimate or residual standardization is performed.

real(kind=real64), public :: tolerance = 1.0d-8

Finite positive absolute tolerance on maximum coefficient change. This is not a deviance or relative tolerance.

logical, public :: use_robust_weighting = .true.

Enable robust weights; set false for ordinary likelihood IRLS.

Type-Bound Procedures

procedure, public :: set_to_default => go_set_defaults ..\..\

Restore all controls to their component defaults.<\p>